package com.kang.pojo;

import java.util.List;

import com.alibaba.fastjson.JSON;

/**
 * ajax接口返回数据实体类
 * 
 * @author zs614
 *
 */
public class AjaxResult {
	/**
	 * 业务结果
	 */
	private String result = "fail";
	/**
	 * 错误原因
	 */
	private String error = "";
	/**
	 * 返回数据
	 */
	private Object data;
	/**
	 * bootstrap表格插件数据总行数
	 */
	private int total;
	/**
	 * bootstrap表格插件数据
	 */
	private List<?> rows;

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public String getError() {
		return error;
	}

	public void setError(String error) {
		this.error = error;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public List<?> getRows() {
		return rows;
	}

	public void setRows(List<?> rows) {
		this.rows = rows;
	}

	public String toJSONString() {
		return JSON.toJSONString(this);
	}
}
